package com.network;

import java.net.DatagramPacket;
import java.net.DatagramSocket;

public class Receiver {
    public static void main(String[] args) throws Exception{
        byte[] bytes = new byte[1024];
        DatagramPacket p = new DatagramPacket(bytes, bytes.length);
        DatagramSocket receiver = new DatagramSocket(3433);
        receiver.receive(p);
        System.out.println("服务端已启动");
        System.out.println(new String(bytes, 0, p.getLength()));
    }

}
